<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="m3" class="login.SignBean" scope="request"/>
<jsp:setProperty property="*" name="m3"/>
<jsp:getProperty property="check" name="m3" />

<c:if test="${m3.result==m3.getOk()}">
	${m3.getExe()}
	
	<%
	//這邊可以把成功訊息傳回login.jsp，在${successMessage}會接收到訊息
	request.setAttribute("successMessage","帳號註冊成功!!");
	request.getRequestDispatcher("login.jsp").forward(request, response);
	%>
</c:if>
<c:if test="${m3.result==m3.getFail()}">
	<jsp:forward page="sign.jsp"/>
	<%
	//這邊可以把錯誤訊息傳回sign.jsp，以及填寫過的資料
	//在${errMessage}與value會接收部分輸入過的訊息
// 	request.setAttribute("errorMessage",m3.getErr().toString());
// 	request.setAttribute("name", m3.getName());
// 	request.setAttribute("nickName", m3.getNickName());
// 	request.setAttribute("tel", m3.getTel());
//	request.setAttribute("email", m3.getEmail());
// 	request.getRequestDispatcher("sign.jsp").forward(request, response);
	%>
</c:if>
